package com.songshuai.sales.client.config;

import com.songshuai.webapi.common.async.BaseAsyncConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

import java.util.concurrent.Executor;

/**
 * Created by yubo on 12/11/2018.
 */
@Configuration
@EnableAsync
public class AsyncConfig extends BaseAsyncConfig implements AsyncConfigurer{

    @Override
    public Executor getAsyncExecutor() {
        ThreadPoolTaskExecutor taskExecutor = getThreadPoolTaskExecutor();
        return taskExecutor;
    }


}